<style lang="scss" scoped>
.confirm-con{
  padding: 38rpx 39rpx 34rpx 39rpx;
  & > view{
    &:nth-child(1){
      color: #F39800;
      font-weight: bold;
      font-size: 35rpx;
      text-align: center;
      position: relative;

      &::after{
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: 39rpx;
        height: 4rpx;
        background: #F39800;
        bottom: -8rpx;
      }
    }
    &:nth-child(2){
      margin-top: 53rpx;
      margin-bottom: 37rpx;
      text-align: center;
      font-size: 29rpx;
      font-weight: 400;
      color: #A1A1A1;
    }
    &:nth-child(3){
      display: flex;
      & > view{
        flex: 1;
        height: 70rpx;
        box-shadow: 0 0 13rpx 3rpx rgba(0,0,0,0.05);
        border-radius: 35rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 31rpx;
        background: #F39800;
        color: #FFFFFF;

        &:nth-child(1){
          margin-right: 24rpx;
          background: #FFFFFF;
          color: #A1A1A1;
        }
      }
    }
  }
}
</style>

<template>
  <u-popup v-model="param.visible" width="70%" border-radius="59" mode="center" @close="close">
    <view class="confirm-con">
      <view>
        {{tit}}
      </view>
      <view>
        {{content}}
      </view>
      <view>
        <view @click="close">取 消</view>
        <view @click="sure">确 定</view>
      </view>
    </view>
  </u-popup>
</template>

<script>
export default {
  name: "ConfirmModal",
  props: {
    param: {
      type: Object,
      default: () => {return {}}
    },
    tit: {
      type: String,
      default: '提示'
    },
    content: {
      type: String,
      default: '确定操作？'
    }
  },
  watch: {
    'param.visible'() {

    }
  },
  data() {
    return {
      show: true
    }
  },
  methods: {
    close() {
      this.$emit('close')
    },
    sure() {
      this.$emit('sure')
      this.close()
    },
  }
}
</script>
